package com.lpf.builder;

import com.lpf.builder.Computer;
import com.lpf.builder.ComputerBuilder;
import com.lpf.builder.DesktopBuilder;
import com.lpf.builder.Director;

public class BuilderPattern {
    public static void main(String[] args) {

        // 建造者模式示例
        ComputerBuilder builder = new DesktopBuilder();
        Director director = new Director();
        director.construct(builder);
        Computer computer = builder.getComputer();
        System.out.println("Built computer: " + computer);
    }
}
